x86/domctl: Make XEN_DOMCTL_set_address_size singleshot
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 7 Dec 2016 17:48:27 +0000 (17:48 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 6 Jan 2017 19:22:01 +0000 (19:22 +0000)
commit02e78311cdc6a7a55215222bd477ffdcd4dbcdcd
tree22221a5b81d6a7e41a6a8e621cf94768c9cd2943
parent9422b16a507120354a4d58d0abc20be3018d4a0e
x86/domctl: Make XEN_DOMCTL_set_address_size singleshot

Toolstacks (including some out-of-tree ones) use XEN_DOMCTL_set_address_size
at most once per domain, and it ends up having a destructive effect on the
available CPUID policy for a domain.

To avoid ordering issues between altering the policy via domctl, and the
constructive effects which would have to happen from switching back to native,
explicitly reject this case.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/domain.c
xen/arch/x86/domctl.c
xen/include/xen/compat.h